﻿@model IEnumerable<BatsMVCPortal.Models.Topic>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            Blog
        </th>
        <th>
            UserId
        </th>
        <th>
            TopicType
        </th>
        <th>
            TopicTitle
        </th>
        <th>
            TopicTags
        </th>
        <th>
            TopicDateAdd
        </th>
        <th>
            TopicRating
        </th>
        <th>
            TopicCountVote
        </th>
        <th>
            TopicCountRead
        </th>
        <th>
            TopicCountComment
        </th>
        <th>
            TopicForbidComment
        </th>
        <th>
            TopicTextShort
        </th>
        <th>
            TopicTextSource
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.Blog.BlogTitle)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.UserId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicType)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicTitle)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicTags)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicDateAdd)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicRating)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicCountVote)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicCountRead)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicCountComment)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicForbidComment)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicTextShort)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.TopicTextSource)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.TopicId }) |
            @Html.ActionLink("Details", "Details", new { id=item.TopicId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.TopicId })
        </td>
    </tr>
}

</table>
